#ifndef MYSEARCH_H_INCLUDED
#define MYSEARCH_H_INCLUDED
#include <iostream>
#include <cstring>
using namespace std;
class SSTable{ 
private:
    int length; 
    int* origin; 
public:
    SSTable();
    SSTable(int, int*);
    ~SSTable();
    int getLength();
    int* getOrigin();
    void setLength(int);
    void setOrigin(int*);
    int binSearch(int); 
};
class BSTreeNode{ 
    int data; 
    BSTreeNode* lchild;
    BSTreeNode* rchild; 
public:
    BSTreeNode();
    BSTreeNode(int);
    BSTreeNode(int, BSTreeNode*, BSTreeNode*);
    ~BSTreeNode();
    int getData();
    BSTreeNode* getLChild();
    BSTreeNode* getRChild();
    void setData(int);
    void setLChild(BSTreeNode*);
    void setRChild(BSTreeNode*);

};
class BSTree{ 
private:
    int num; 
    BSTreeNode* root=new BSTreeNode;
public:
    BSTree();
    BSTree(int, int*); 
    ~BSTree();
    int getNum();
    BSTreeNode* getRoot();
    void setRoot(BSTreeNode*);
    void setNum(int);
    string printTree(); 
    bool searchNode(int); 
    bool addNode(int); 
    bool deleteNode(int); 
};
#endif 